package com.wjh.controler;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping("/pdf")
public class UserPDFControler extends AbstractController {
    @Override
    @RequestMapping("getpdf")
    protected ModelAndView handleRequestInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
        Map<String,String> userData = new HashMap<String,String>();
        userData.put("100", "Xiao.Lu");
        userData.put("102", "User 102");
        userData.put("301", "User 301");
        userData.put("400", "User 400");
        return new ModelAndView("UserSummary","userData",userData);
    }
}
